/*************************************************************************
    > File Name: client.cpp
    > Author: Lancer
    > Mail: 18826075768@163.com
************************************************************************/

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fstream>
#include "mymsg.pb.h"
using namespace std;

void ListMsg(const Im::Content& msg){
    cout << msg.id() << endl;
    cout << msg.str() << endl;
}

int main(){
    Im::Content msg1;
    fstream input("./log", ios::in | ios::binary);
    if(!msg1.ParseFromIstream(&input)){
        cerr << "failed to parse address book." << endl;
        return -1;
    }
    ListMsg(msg1);
    return 0;
}